package cn.quang.search.toolkit.provider.entity;

import java.util.Collections;
import java.util.List;

public class QuerySlice {
    private String sqlTemplate;
    private List<KeyOperatorValue> keyOperatorValues;

    public static QuerySlice of(String sqlTemplate, KeyOperatorValue keyOperatorValue) {
        return QuerySlice.of(sqlTemplate, Collections.singletonList(keyOperatorValue));
    }

    public static QuerySlice of(String sqlTemplate, List<KeyOperatorValue> keyOperatorValues) {
        QuerySlice querySlice = new QuerySlice();
        querySlice.setSqlTemplate(sqlTemplate);
        querySlice.setKeyOperatorValues(keyOperatorValues);
        return querySlice;
    }

    public String getSqlTemplate() {
        return sqlTemplate;
    }

    public void setSqlTemplate(String sqlTemplate) {
        this.sqlTemplate = sqlTemplate;
    }

    public List<KeyOperatorValue> getKeyOperatorValues() {
        return keyOperatorValues;
    }

    public void setKeyOperatorValues(List<KeyOperatorValue> keyOperatorValues) {
        this.keyOperatorValues = keyOperatorValues;
    }
}
